home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / intuisup.lha / Intuisup / source.lha / Menus / menus.h < prev   
C/C++ Source or Header  |  1992-06-03  |  3KB  |  82 lines

  1. /* $Revision Header *** Header built automatically - do not edit! ***********
  2.  *
  3.  *    (C) Copyright 1991 by Torsten Jürgeleit
  4.  *
  5.  *    Name .....: menus.h
  6.  *    Created ..: Thursday 19-Dec-91 18:03:00
  7.  *    Revision .: 1
  8.  *
  9.  *    Date        Author                 Comment
  10.  *    =========   ====================   ====================
  11.  *    03-Jun-92   Torsten Jürgeleit      alternate color for menu item texts
  12.  *    19-Dec-91   Torsten Jürgeleit      Created this file!
  13.  *
  14.  ****************************************************************************
  15.  *
  16.  *    Menu support routines
  17.  *
  18.  * $Revision Header ********************************************************/
  19.  
  20. #ifndef    ISUP_MENUS_H
  21. #define    ISUP_MENUS_H
  22.  
  23.     /* Defines */
  24.  
  25. #define MENU_DATA_TYPE_TITLE    1
  26. #define MENU_DATA_TYPE_ITEM    2
  27. #define MENU_DATA_TYPE_SUBITEM    3
  28.  
  29. #define MAX_MENU_DATA_TYPE    MENU_DATA_TYPE_SUBITEM
  30.  
  31. #define MENU_DATA_FLAG_DISABLED        (1 << 0)    /* disable menu or menu item */
  32. #define MENU_DATA_FLAG_ATTRIBUTE    (1 << 1)    /* attribute menu item */
  33. #define MENU_DATA_FLAG_SELECTED        (1 << 2)    /* selected attribute menu item */
  34. #define MENU_DATA_FLAG_EMPTY_LINE    (1 << 3)    /* insert empty line before this item */
  35. #define MENU_DATA_FLAG_HIGH_NONE    (1 << 4)    /* no highliting */
  36. #define MENU_DATA_FLAG_HIGH_BOX        (1 << 5)    /* highliting with box, otherwise with complement */
  37. #define MENU_DATA_FLAG_TEXT_COLOR2    (1 << 6)    /* alternate color for item text */
  38.  
  39. #define MENU_LIST_FLAG_ATTACHED        (1 << 0)    /* menu list is currently attached to a window */
  40.  
  41.     /* Structures */
  42.  
  43. struct MenuList {
  44.     struct RenderInfo  *ml_RenderInfo;
  45.     struct Window      *ml_Window;
  46.     struct TextAttr    *ml_TextAttr;
  47.     struct TextFont    *ml_TextFont;
  48.     struct MenuData    *ml_Data;
  49.     LONG    ml_ID;        /* id = 'ISUP' */
  50.     USHORT    ml_Flags;
  51.     UBYTE    ml_TextPen1;
  52.     UBYTE    ml_TextPen2;
  53.     BYTE    **ml_LanguageTextArray;
  54.     BYTE    *ml_Buffer;
  55.     ULONG    ml_BufferSize;
  56. };
  57. struct MenuData {
  58.     USHORT    md_Type;
  59.     USHORT    md_Flags;
  60.     BYTE    *md_Text;
  61.     BYTE    *md_CommandKey;
  62.     ULONG    md_MutualExclude;
  63. };
  64.     /* Global prototypes */
  65.  
  66. struct MenuList  *create_menu(struct RenderInfo  *ri, struct Window  *win,
  67.     struct MenuData  *md, struct TextAttr  *ta, BYTE **language_text_array);
  68. VOID attach_menu(struct Window  *win, struct MenuList  *ml);
  69. struct MenuItem  *menu_item_address(struct MenuList  *ml, USHORT menu_num);
  70. struct Window  *remove_menu(struct MenuList  *ml);
  71. VOID free_menu(struct MenuList  *ml);
  72.  
  73.     /* Global pragmas (Aztec C v5.2a) */
  74.  
  75. #pragma intfunc(create_menu(a0,a1,a2,a3,d0))
  76. #pragma intfunc(attach_menu(a0,a1))
  77. #pragma intfunc(menu_item_address(a0,d0))
  78. #pragma intfunc(remove_menu(a0))
  79. #pragma intfunc(free_menu(a0))
  80.  
  81. #endif   /* ISUP_MENUS_H */
  82.